package com.controller;

import com.entity.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.util.Date;

@RestController
public class UserController {
    @RequestMapping("/")
    public User index(){
        return new User(100,"ddd",new Date());
    }

    @RequestMapping("/upload")
    public void upload(MultipartFile file){

        System.out.println("upload");
    }

    //跨域的演示
    @RequestMapping("/data")
    public void datad(){
        System.out.println("dsfsfsdf");
    }
}
